fix: apply query variable defaults when undefined is passed explicitly - #13362
fix: apply query variable defaults when undefined is passed explicitly#13362atharv-sys32 wants to merge 1 commit into
Conversation
✅ AI Style Review — No Changes DetectedNo MDX files were changed in this pull request. Review Log: View detailed log
|
|
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe cache store reader now removes ChangesCache variable default handling
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
When query variables like { show: undefined } are passed, the cache's
diffQueryAgainstStore would overwrite GraphQL-specified default values
with undefined by spreading the user-provided variables directly.
This caused @include/@Skip directives to fail with 'Invalid variable
referenced' errors.
Filter out undefined values before merging with defaults, matching the
behavior already implemented in QueryManager.getVariables.
Fixes #13345
99e227c to
4411bea
Compare
Fixes #13345
Summary by CodeRabbit
undefined.